package com.study.reference;

import java.io.IOException;
import java.lang.ref.WeakReference;

/**
 * @Author HBZ
 * @Date 2020/9/12 22:46
 * @Description
 */
public class T3_WeakReference {
    public static void main(String[] args) throws IOException {
        WeakReference<M> m = new WeakReference<>(new M());
        System.out.println(m.get());
        System.gc();
        System.out.println(m.get());
        System.in.read();
    }
}
